package com.zrwl.poscloud.base.constants;

/**
 * @author liuxiaolong
 * @date 2022/7/23
 * @description
 */
public class ChargeTypeConstants {

    /**
     * expense_type 费用类型
     */
    public static final int type_realEstate = 1;//物业
    public static final int type_rent = 2;//租金
    public static final int type_water = 3;//水费
    public static final int type_electricity = 4;//电费

    /**
     * billing_method 计费方式
     */
    public static final int method_fixedAmt = 1;//固定额
    public static final int method_dosage = 2;//用量
    public static final int method_area = 3;//面积
    /**
     * billing_cycle 计费周期
     */
    public static final int cycle_week = 1;//周
    public static final int cycle_month = 2;//月
    public static final int cycle_season = 3;//季
    public static final int cycle_year = 4;//年
    public static final int cycle_day = 5;//日
    /**
     * charging_period 收费周期
     */
    public static final int period_one = 1;//1个月
    public static final int period_six = 2;//6个月
    public static final int period_twelve = 3;//12个月
    public static final int period_three = 4;//3个月
    /**
     * payment_date_generate_mode 账期生成方式
     */
    public static final int mode_labour = 1;//人工创建
    public static final int mode_port = 2;//接口创建
    public static final int mode_auto = 3;//自动创建
    /**
     * first_month_generate_rule 首月生成规则
     */
    public static final int rule_one = 1;//首月不足满月则向后推一月
    public static final int mode_two = 2;//首月不足满月则补齐首月
    public static final int mode_default = 3;//以
    /**
     * deposit_period 押金周期
     */
    public static final int cash_one = 1;//一月

    public static int getChargingPeriodValue(int type) {
        switch (type) {
            case period_one:
                return 1;
            case period_six:
                return 6;
            case period_twelve:
                return 12;
            case period_three:
                return 3;
            default:
                return 0;
        }
    }

}
